import axios from '@/libs/request'

/***
 * 统计
 */

// 外来入沈人员统计
export const getwlryCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getwlryCount',
    data: data,
    type: 'post'
  })
}
// 转送人员统计
export const getzsryCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getzsryCount',
    data: data,
    type: 'post'
  })
}
// 宾馆统计
export const getbgtjList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getbgtjList',
    data: data,
    type: 'post'
  })
}
// 密接人员统计
export const getContacCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getContacCount',
    data: data,
    type: 'post'
  })
}
// 确诊人员统计
export const getAsymptomaticCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getAsymptomaticCount',
    data: data,
    type: 'post'
  })
}
// 隔离人员统计
export const getglryCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getglryCount',
    data: data,
    type: 'post'
  })
}
// 核酸检测统计
export const getSamplingCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getSamplingCount',
    data: data,
    type: 'post'
  })
}
// 宾馆数量统计
export const getglbgCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getglbgCount',
    data: data,
    type: 'post'
  })
}

// 查询红码 - 预警提示数据库
export const findtypeList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findtypeList',
    data: data,
    type: 'get'
  })
}

// 隔离宾馆详细统计
export const getbgCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getbgCount',
    data: data,
    type: 'post'
  })
}

/***
 * 列表
 */
// 外来入境人员列表
export const findrjryList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findrjryList',
    data: data,
    type: 'post'
  })
}

export const selectFindCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/selectFindCountList',
    data: data,
    type: 'post'
  })
}

// 隔离人员列表
export const findglrypxList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglrypxList',
    data: data,
    type: 'post'
  })
}

// 转送人员列表
export const findzsryList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findzsryList',
    data: data,
    type: 'post'
  })
}

// 密接人员列表
export const contacList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/contacList',
    data: data,
    type: 'post'
  })
}

// 确诊人员列表
export const asymptomaticList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/asymptomaticList',
    data: data,
    type: 'post'
  })
}

// 核酸检测列表
export const samplingList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/samplingList',
    data: data,
    type: 'post'
  })
}

// 隔离人员列表
export const findglryList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglryList',
    data: data,
    type: 'post'
  })
}

// 隔离宾馆列表
export const findglbgList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglbgList',
    data: data,
    type: 'post'
  })
}

// 隔离宾馆明细列表
export const findglbgDetailList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getbgList',
    data: data,
    type: 'post'
  })
}

// 图表
// 入境人员区县分类统计列表
export const getwlryCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getwlryCountList',
    data: data,
    type: 'post'
  })
}
// 隔离人员区县分类统计列表
export const getglryCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getglryCountList',
    data: data,
    type: 'post'
  })
}
// 密接人员区县分类统计列表
export const getContacCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getContacCountList',
    data: data,
    type: 'post'
  })
}
// 确诊和无症状人员区县分类统计列表
export const getAsymptomaticCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getAsymptomaticCountList',
    data: data,
    type: 'post'
  })
}
// 核酸检测区县分类统计列表
export const getSamplingCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/getSamplingCountList',
    data: data,
    type: 'post'
  })
}
// 宾馆图表
export const findglbgCountyList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglbgCountyList',
    data: data,
    type: 'post'
  })
}

// 北京分流
export const getglRYSSXCount = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/getglRYSSXCount',
    data: data,
    type: 'post'
  })
}
export const findglRYSSXCountList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglRYSSXCountList',
    data: data,
    type: 'post'
  })
}
export const findglRYSSXInfoList = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/findglRYSSXInfoList',
    data: data,
    type: 'post'
  })
}
export const insertfindglbgCounty = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/insertfindglbgCounty',
    data: data,
    type: 'post'
  })
}
export const updatefindglbgCounty = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlry/updatefindglbgCounty',
    data: data,
    type: 'post'
  })
}
// 插入确诊人员
export const createqzry = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/createqzry',
    data: data,
    type: 'post'
  })
}
// 插入隔离宾馆和是否确诊病例，入沈入境核酸检测密接人员
export const insetgequ = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/insetgequ',
    data: data,
    type: 'post'
  })
}
// 修改确诊人员
export const updateqzry = (data) => {
  return axios.request({
    url: '/api/as/yiqing/yqwlryinfo/updateqzry',
    data: data,
    type: 'post'
  })
}
// 密接导入数据
export const yiQingMjryService = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingMjryService/insert',
    data: data,
    type: 'post'
  })
}
// 核酸导入数据
export const yiQingHsjcService = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingHsjcService/insert',
    data: data,
    type: 'post'
  })
}
// 入沈导入数据
export const yiQingGlryService = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingGlryService/insert',
    data: data,
    type: 'post'
  })
}
// 中转导入数据
export const yiQingZZService = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingHsjcService/insertTransshipment',
    data: data,
    type: 'post'
  })
}
// 预提报导入数据
export const yiQingYTBService = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingHsjcService/insertUser',
    data: data,
    type: 'post'
  })
}
// 隔离人员导入数据
export const insertIsolation = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingHsjcService/insertIsolation',
    data: data,
    type: 'post'
  })
}
// 集中观察导入数据
export const insertConcentrated = (data) => {
  return axios.request({
    url: '/api/uc/yiqing/yiQingHsjcService/insertConcentrated',
    data: data,
    type: 'post'
  })
}
// 时间转换为日期-> 2019-02-02
export function date2str (date, containtime) {
  if (!date || typeof date === 'string') {
    return date
  }
  var time1 = date.getFullYear()
  var month = date.getMonth() + 1
  var day = date.getDate()
  time1 += '-' + (month < 10 ? '0' + month : month)
  time1 += '-' + (day < 10 ? '0' + day : day)
  return time1
}
